/*
 * CommandeEvaluerObs.cpp
 *
 *  Created on: 19 nov. 2012
 *      Author: aboursie - potier
 */

#include "CommandeEvaluerObs.h"

void CommandeEvaluerObs::execute() {
	try{robot->evaluerObstacle();
	}catch (EtatRobot::BadAction){
		pile.pop();
	}
}

Commande* CommandeEvaluerObs::constructeurVirtuel() {
	Commande* tmp = new CommandeEvaluerObs(robot);
	pile.push(tmp);
	return tmp;
}

void CommandeEvaluerObs::desexecute() {
	pile.pop();
	robot->notify();
}
